define(function () {
    'use strict';
    function ctrl($scope, $state, $stateParams, $ionicLoading, $sce, CommonService) {
        function init() {
            $scope.agreement = {content: '', checked: false};
            // 获取协议
            //$ionicLoading.show({noBackdrop:true});
            //$scope.risk.content=$sce.trustAsHtml(data);
            //$ionicLoading.hide();
        }

        $scope.$on('$ionicView.beforeEnter', function () {
            init()
        });

        //下一步
        $scope.submit = function () {
            //开通成功
            CommonService.showComplete('../view/template/accounttemplate.html', '返回首页', 'tab.account-index');
        }
    }

    ctrl.$inject = ['$scope', '$state', '$stateParams', '$ionicLoading', '$sce', 'CommonService'];
    return ctrl;
});